package com.yiibai.tutorial.javabasic.variable;

public class ForEachExample {
	public static void main(String[] args) {
		int arr[] = { 12, 23, 44, 56, 78 };
		int sum = 0;
		for (int i : arr) {
			System.out.println(i);
			sum += i;
		}
		System.out.println("sum = " + sum);
	}
}